interface Programmer {
    name: string;
    goodAt: string;
    writingCodes(): void;
}

class Staff implements Programmer {
    name: string;
    goodAt: string;

    constructor(name: string, goodAt: string) {
        this.name = name;
        this.goodAt = goodAt;
    }

    writingCodes(): void {
        console.log(`姓名：${this.name}，擅长：${this.goodAt}，正在写代码～`);
    }
}

let staff1: Staff = new Staff("ShirDon", "Programming");
staff1.writingCodes();
// $ tsc TypeScriptExample8.ts
// $ node TypeScriptExample8.js
// 姓名：ShirDon，擅长：Programming，正在写代码～